package com.huike.contract.service.impl;

import com.huike.common.core.controller.BaseController;
import com.huike.common.core.page.TableDataInfo;
import com.huike.contract.domain.TbContract;
import com.huike.contract.mapper.TbContractMapper;
import com.huike.contract.service.ContractService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author STJ12138
 * @version 1.0
 * @description: TODO
 * @date 2023/7/13 11:57
 */
@Service
public class ContractServiceImpl extends BaseController implements ContractService {
    @Resource
    private TbContractMapper contractMapper;
    @Override
    public TableDataInfo<List<TbContract>> list(TbContract tbContract) {
        startPage();
        Map<String, Object> params = tbContract.getParams();
        String beginCreateTime = (String) params.get("beginCreateTime");
        String endCreateTime = (String) params.get("endCreateTime");
        List<TbContract> list = contractMapper.list(tbContract,beginCreateTime,endCreateTime);
        return getDataTable(list,params);
    }
}
